/*
SSD1289 3.2" TFT LCD Image Loader Functions for PIC32MX795F512L
Copyright (C) 2012 Craig Dawson, Aaron Mohtar, Craig Peacock

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

void lcdLoadBitmap(char filename[]);

typedef struct __attribute__((aligned(2), packed))
{
    UINT16 bfType;          // Magic
    UINT32 bfSize;          // Size of file
    UINT16 bfReserved1;     // Reserved
    UINT16 bfReserved2;     // Reserved
    UINT32 bfOffset;        // Offset to bitmap image data
} BITMAPFILEHEADER;

typedef struct __attribute__((aligned(2), packed))
{
    unsigned int   biSize;           // Size of header
    int            biWidth;          // Width of image
    int            biHeight;         // Height of image
    unsigned short biPlanes;         // Number of color planes
    unsigned short biBitCount;       // Number of bits per pixel
    unsigned int   biCompression;    // Compression
    unsigned int   biSizeImage;      // Size of image data
    int            biXPelsPerMeter;  // X pixels per meter
    int            biYPelsPerMeter;  // Y pixels per meter
    unsigned int   biClrUsed;        // Number of colors used
    unsigned int   biClrImportant;   // Number of important colors
} BITMAPINFOHEADER;

typedef struct __attribute__((aligned(1), packed))
{
    unsigned char   blue;
    unsigned char   green;
    unsigned char   red;
} BITMAP24BPIXEL;